import request from '@/utils/request'

// 查询bottleneck列表
export function listBottleneck(query) {
  return request({
    url: '/production/bottleneck/list',
    method: 'get',
    params: query
  })
}

// 查询bottleneck详细
export function getBottleneck(blId) {
  return request({
    url: '/production/bottleneck/' + blId,
    method: 'get'
  })
}

// 新增bottleneck
export function addBottleneck(data) {
  return request({
    url: '/production/bottleneck',
    method: 'post',
    data: data
  })
}

// 修改bottleneck
export function updateBottleneck(data) {
  return request({
    url: '/production/bottleneck',
    method: 'put',
    data: data
  })
}

// 删除bottleneck
export function delBottleneck(blId) {
  return request({
    url: '/production/bottleneck/' + blId,
    method: 'delete'
  })
}

// 导出bottleneck
export function exportBottleneck(query) {
  return request({
    url: '/production/bottleneck/export',
    method: 'get',
    params: query
  })
}

//根据机台查询对应的物料
export function getMoeWldmByJtbh(jtbh) {
  return request({
    url: '/production/bottleneck/getMoeWldmByJtbh/' + jtbh,
    method: 'get'
  })
}
